
package edu.faytechcc.csc251.elementalTD;

import java.awt.*;
import java.util.ArrayList;

/**
 * The block class is used to create blocks with graphics
 * In addition also contains the logic for the towers
 * 10/10/2013 CIS 251
 *
 * @author William Robles
 */
public class Block extends Rectangle
{    
    public int groundID;
    public int upperLevelID;    
    
    /**
     * block method creates blocks based on for towers,
     * mobs, ground and air
     * 
     * @param x
     * @param y
     * @param width
     * @param height
     * @param groundID
     */
    public Block(int x, int y, int width, int height, int groundID)
    {
        setBounds(x, y, width, height);
        
        this.groundID = groundID;
    }
    
    /**
     * draw method creates the map based on "load/map.alpha" using
     * the values class
     * 
     * the upperLevel is created to place objects on top of the
     * groundLevel and not overwrite the block
     * @param g 
     */
    public void draw(Graphics g)
    {
        g.drawImage(GameDisplay.tile_groundTex[groundID], x, y, width, height, null);
    }
}
